package mvp.com.bbc.rcjavaretrofitdaggermvp.app.utils;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.SwitchCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.SeekBar;
import android.widget.TextView;

import butterknife.BindView;
import mvp.com.bbc.rcjavaretrofitdaggermvp.R;
import mvp.com.bbc.viewpagerlayoutmanager.CircleScaleLayoutManager;

/**
 * Created by ${cbf} on 2017/11/30.
 */

public class BottmTopUpWindow extends SettingPopUpWindow implements SeekBar.OnSeekBarChangeListener, CompoundButton.OnCheckedChangeListener {
    @BindView(R.id.radius_value)
    TextView radiusValue;
    @BindView(R.id.sb_radius)
    SeekBar sbRadius;
    @BindView(R.id.interval_value)
    TextView intervalValue;
    @BindView(R.id.sb_interval)
    SeekBar sbInterval;
    @BindView(R.id.center_scale_value)
    TextView centerScaleValue;
    @BindView(R.id.sb_center_scale)
    SeekBar sbCenterScale;
    @BindView(R.id.speed_value)
    TextView speedValue;
    @BindView(R.id.sb_speed)
    SeekBar sbSpeed;
    @BindView(R.id.s_reverse)
    SwitchCompat sReverse;
    @BindView(R.id.s_infinite)
    SwitchCompat sInfinite;
    @BindView(R.id.s_auto_center)
    SwitchCompat sAutoCenter;
    private CircleScaleLayoutManager circleScaleLayoutManager;
    private RecyclerView recyclerView;

    public BottmTopUpWindow(Context context, CircleScaleLayoutManager circleScaleLayoutManager, RecyclerView recyclerView) {
        super(context);
        this.circleScaleLayoutManager = circleScaleLayoutManager;
        this.recyclerView = recyclerView;
        View view = LayoutInflater.from(context).inflate(R.layout.dialog_circle_scale_setting, null, false);
        setContentView(view);
        sbRadius.setOnSeekBarChangeListener(this);
        sbInterval.setOnSeekBarChangeListener(this);
        sbSpeed.setOnSeekBarChangeListener(this);
        sbCenterScale.setOnSeekBarChangeListener(this);
        sbRadius.setProgress(Util.Dp2px(context, 20));
        sbSpeed.setProgress(400);
        sbCenterScale.setProgress(Util.Dp2px(context, 20));
        sbInterval.setProgress(Util.Dp2px(context, 1));
        sAutoCenter.setChecked(true);
    }

    @Override
    public void onCheckedChanged(CompoundButton compoundButton, boolean b) {

    }

    @Override
    public void onProgressChanged(SeekBar seekBar, int i, boolean b) {

    }

    @Override
    public void onStartTrackingTouch(SeekBar seekBar) {

    }

    @Override
    public void onStopTrackingTouch(SeekBar seekBar) {

    }
}
